package com.dingding.service.store.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.beans.CouponStore;
import com.dingding.facde.store.service.IStoreService;
import com.dingding.service.store.dao.ICouponStoreDao;

@Component("storeService")
public class StoreServiceImpl implements IStoreService {

	private Logger log = Logger.getLogger(this.getClass());

	@Resource(name = "couponStoreDao")
	private ICouponStoreDao couponStoreDao; // 优惠券门店列表

	/**
	 * @Description: 获取优惠券门店列表
	 * @author fengshuonan
	 * @return List<CouponStore> 优惠券门店列表
	 */
	@Transactional(readOnly = true)
	public List<CouponStore> getCouponStoreList() {

		List<CouponStore> list = new ArrayList<CouponStore>();

		try {
			list = couponStoreDao.queryAll();
		} catch (Exception e) {
			log.error("查询所有门店信息出错！CouponStoreDaoImpl：getStroeList()", e);
		}

		return list;
	}

}
